<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>5-对象相关的知识</title>
</head>
<body>


<script type="text/javascript">

  let a = 'name'

  let obj ={} //{'name':'tom'}

  obj[a] = 'tom'

  console.log(obj)


</script>
</body>
</html>